<?php

namespace app\models;

class UserAssets extends \app\models\BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Column(type="integer", length=10, nullable=false)
     */
    public $uid;

    /**
     *
     * @var double
     * @Column(type="double", length=13, nullable=false)
     */
    public $balance;

    /**
     *
     * @var integer
     * @Column(type="integer", length=3, nullable=false)
     */
    public $status;

    /**
     *
     * @var double
     * @Column(type="double", length=13, nullable=false)
     */
    public $recharge;

    /**
     *
     * @var double
     * @Column(type="double", length=13, nullable=false)
     */
    public $mention;

    /**
     *
     * @var double
     * @Column(type="double", length=13, nullable=false)
     */
    public $send_balance;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("fishing-account");
        $this->setSource("user_assets");
        $this->belongsTo('uid', '\app\models\User1', 'id', ['alias' => 'User']);
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'user_assets';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return UserAssets[]|UserAssets|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return UserAssets|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
